package com.yale.spring.cloud.commons;

import lombok.Data;

/**
 * @author yale
 */
@Data
public class OpenResponse<T> {

    private String msg;

    private int code;

    private T data;

    public OpenResponse(){
        this.code=OpenResponseCode.SUCCESS.getCode();
        this.msg=OpenResponseCode.SUCCESS.getDescription();
    }

    public OpenResponse(OpenResponseCode openResponseCode){
        this.code=openResponseCode.getCode();
        this.msg=openResponseCode.getDescription();
    }


}
